home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / Makefile.st < prev    next >
Encoding:
Makefile  |  1994-01-30  |  24.2 KB  |  646 lines

  1. # Makefile for GNU C NATIVE COMPILER for the atariST/TT series hosted
  2. #  on a Sparc host (tested only on Sun)S 4.0.3)
  3. #  NOTE: requires alloca.c from the emacs dist.
  4. #
  5.  
  6. # Makefile for GNU C compiler.
  7. #   Copyright (C) 1987 Free Software Foundation, Inc.
  8.  
  9. #This file is part of GNU CC.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY.  No author or distributor
  13. #accepts responsibility to anyone for the consequences of using it
  14. #or for whether it serves any particular purpose or works at all,
  15. #unless he says so in writing.  Refer to the GNU CC General Public
  16. #License for full details.
  17.  
  18. #Everyone is granted permission to copy, modify and redistribute
  19. #GNU CC, but only under the conditions described in the
  20. #GNU CC General Public License.   A copy of this license is
  21. #supposed to have been given to you along with GNU CC so you
  22. #can know your rights and responsibilities.  It should be in a
  23. #file named COPYING.  Among other things, the copyright notice
  24. #and this notice must be preserved on all copies.
  25.  
  26. .NOEXPORT: # This tells GNU Make version 3
  27.        # not to put all the variables in the environment.
  28.  
  29.  
  30. CROSSDIR = /share/gcc-cross/atari
  31. CROSSBIN = $(CROSSDIR)/bin
  32. CROSSLIB = $(CROSSDIR)/lib
  33. CROSSINC = $(CROSSDIR)/include
  34.  
  35. # BASEREL not yet supported. Howard has sent some diffs for baserel
  36. #         but they only work for gcc-cc1 and not gcc-cc1plus. since
  37. #      gcc-cc1plus shares most .o files with gcc-cc1, until that
  38. #         is resolved, baserel is unsupported.
  39. # BASEREL = -mbaserel -mpcrel
  40.  
  41. # ARCHFLAGS    if unset, the default is -m68000 that will work on all STs
  42. #            for the TT set -m68020 -m68881 for the falcon you probably
  43. #        only want -m68020 unless you have the optional co-proc.
  44. #
  45. #        note: the above applies only when you have not changed the
  46. #        TARGET_DEFAULT in tm-atari.h yourself. if you have changed
  47. #        the default then adjust as appro.
  48. # ARCHFLAGS = -m68020 -m68881
  49.  
  50. CC = $(CROSSBIN)/cgcc -pipe -mint
  51. DFLAGS = -DCROSSDIR=\"\"
  52. CFLAGS = $(ARCHFLAGS) $(BASEREL) $(DFLAGS) -O2 -fomit-frame-pointer -I$(CROSSINC) -I./config -I. -Datarist=1
  53. LDFLAGS =  $(ARCHFLAGS) $(BASEREL)
  54.  
  55. # hosts cc (give full path to gcc is hosts gcc is not before . in your PATH)
  56. HOSTCC=/usr/o0/sparc-sun-sunos4.1/bin/gcc
  57. HOSTCFLAGS = $(DFLAGS) -O -I./config -I.
  58. # HOSTLDFLAGS =
  59.  
  60. # OLDCC should not be the GNU C compiler.
  61. OLDCC = cc
  62. BISON = bison
  63. BISONFLAGS=
  64. AR = ar
  65. SHELL = /bin/sh
  66.  
  67. bindir = 
  68. libdir = 
  69.  
  70. # These are what you would need on HPUX:
  71. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  72. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  73. # bites whenever tree.def, rtl.def or machmode.def is included
  74. # (ie., on every source file).
  75. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  76. # For CCLIBFLAGS you might want to specify the switch that
  77. # forces only 68000 instructions to be used.
  78.  
  79. # If you are making gcc for the first time, and if you are compiling it with
  80. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  81. # of the standard libraries (as is true for HP/UX or Genix),
  82. # then get alloca.c from GNU Emacs and un-comment the following line:
  83. # ALLOCA = alloca.o
  84.  
  85. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  86. # CLIB= -lPW
  87.   
  88. # If your system's malloc() routine fails for any reason (as it does on
  89. # certain versions of Genix), try getting the files
  90. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  91. # MALLOC = malloc.o
  92.  
  93. # If you are running GCC on an Apollo, you will need this:
  94. # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
  95.  
  96. # Change this to a null string if obstacks are installed in the
  97. # system library.
  98. OBSTACK=obstack.o
  99. OBSTACK1=obstack.oo
  100.  
  101. # Dependency on obstack, alloca, malloc or whatever library facilities
  102. # are not installed in the system libraries.
  103. LIBDEPS= $(OBSTACK)
  104. LIBDEPS1= $(OBSTACK1) $(HOSTALLOCA) $(MALLOC)
  105.  
  106. # How to link with both our special library facilities
  107. # and the system's installed libraries.
  108. LIBS = $(OBSTACK)
  109. LIBS1 = $(OBSTACK1) $(HOSTALLOCA) $(MALLOC) $(MALLOC1) $(CLIB)
  110.  
  111. DIR = ../gcc
  112.  
  113. # Object files of CC1.
  114. # Language-specific object files for C.
  115. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  116.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  117.  
  118. # Language-specific object files for C++.
  119. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  120.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  121.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  122.    cp-class.o cp-init.o cp-method.o cp-except.o \
  123.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  124.    $(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
  125.  
  126. # Files specific to the C interpreter bytecode compiler(s).
  127. BC_OBJS = bc-emit.o bc-optab.o
  128.  
  129. # Language-independent object files.
  130. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  131.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  132.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  133.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  134.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  135.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  136.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  137.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  138.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  139.  
  140. GCC_PASSES=gcc cc1 cpp
  141.  
  142. # Files to be copied away after each stage in building.
  143. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  144.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  145.  insn-attr.h insn-attrtab.c insn-opinit.c \
  146.  stamp-flags stamp-config stamp-codes \
  147.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  148.  stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  149.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  150.  genattrtab genattr genopinit \
  151.  bc-arity.h bc-opcode.h bc-opname.h \
  152.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  153.  bi-arity bi-opcode bi-opname \
  154.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  155.  cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
  156.  
  157. # Header files that are made available to programs compiled with gcc.
  158. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  159.  
  160. # If you want to recompile everything, just do rm *.o.
  161. # CONFIG_H = config.h tm.h
  162. CONFIG_H =
  163. RTL_H = rtl.h rtl.def machmode.h machmode.def
  164. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  165. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  166. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  167.  
  168. ALL =  gcc.ttp gcc-cc1.ttp gcc-cpp.ttp gcc-cc1plus.ttp
  169.  
  170. all : $(ALL)
  171.  
  172. compilations: ${OBJS}
  173.  
  174. gcc.ttp: gcc.o version.o $(LIBDEPS)
  175.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc.ttp gcc.o version.o $(LIBS)
  176.  
  177. gcc.o: gcc.c $(CONFIG_H)
  178.     $(CC) $(CFLAGS) -DDEFAULT_TARGET_MACHINE=\"atariST\" -c gcc.c
  179.  
  180. gcc-cc1.ttp: $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  181.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1.ttp $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  182.  
  183. gcc-cc1plus.ttp: $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  184.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1plus.ttp $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  185.  
  186. gcc-cc1o.ttp: $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  187.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1o.ttp $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  188.  
  189. # C-language specific files.
  190.  
  191. c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
  192.     $(CC) $(CFLAGS) -c c-parse.c
  193. c-parse.c c-parse.h: c-parse.y
  194.     $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  195.  
  196. c-parse.y: c-parse.in 
  197.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  198.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  199.       ./c-parse.in > ./c-parse.y
  200.  
  201. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  202. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  203. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  204. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  205.     input.h flags.h
  206. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  207. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  208. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  209.  
  210. # C++ language specific files.
  211.  
  212. cp-parse.o : cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  213.     $(CC) -c $(CFLAGS) cp-parse.c
  214.  
  215. cp-parse.c cp-parse.h : cp-parse.y
  216.     @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
  217.     $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  218.     grep '^#define[     ]*YYEMPTY' cp-parse.c >>cp-parse.h
  219.  
  220. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  221.    cp-parse.h flags.h
  222. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  223.    cp-parse.h cp-input.c flags.h
  224. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  225.   cp-lex.h cp-decl.h stack.h
  226. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  227.   cp-lex.h cp-decl.h
  228. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  229. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  230. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
  231.     cp-class.h flags.h
  232. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
  233.     flags.h
  234. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  235. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  236. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  237. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  238. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  239. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  240. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  241. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  242. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  243.   expr.h insn-codes.h
  244. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  245. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  246. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  247. cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
  248. cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
  249.  
  250. # Objectionable C language specific files.
  251.  
  252. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  253.    c-tree.h input.h flags.h objc-actions.h
  254.     $(CC) $(CFLAGS) -c objc-parse.c
  255. objc-parse.c : objc-parse.y
  256.     $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  257.  
  258. objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
  259.    flags.h objc-actions.h
  260.  
  261. # A file used by all variants of C.
  262.  
  263. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  264.  
  265.  
  266. # Language-independent files.
  267. dumpvers: dumpvers.c
  268.  
  269. version.o: version.c
  270. obstack.o: obstack.c
  271.  
  272. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  273. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  274. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  275. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  276. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  277.  insn-attr.h xcoffout.h
  278.  
  279. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  280.  
  281. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  282. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  283.  
  284. toplev.o: bytecode.h bc-emit.h
  285. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \
  286.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  287. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  288.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  289.    recog.h output.h bytecode.h
  290. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  291.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  292.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  293.    bc-emit.h
  294. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
  295.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  296.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  297.    bc-emit.h modemap.def
  298. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  299.    insn-flags.h
  300. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  301.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  302. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  303.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  304. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  305.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  306. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  307.    insn-config.h reload.h gstab.h xcoffout.h
  308. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  309.    insn-config.h reload.h
  310. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  311.    insn-config.h reload.h output.h
  312. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  313. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h  \
  314.    regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h bc-opcode.h \
  315.    bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  316. real.o : real.c $(CONFIG_H) $(TREE_H)
  317. getpwd.o : getpwd.c $(CONFIG_H)
  318.  
  319. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  320.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  321.    bytecode.h
  322.  
  323. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  324.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  325. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  326.  
  327. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  328.    insn-config.h recog.h
  329. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  330.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  331. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  332.    integrate.h regs.h flags.h expr.h loop.h
  333. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  334.    basic-block.h regs.h hard-reg-set.h output.h
  335. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  336.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  337.    basic-block.h recog.h real.h
  338. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  339.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  340. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  341.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  342. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  343.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  344.  
  345. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  346.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  347. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  348.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  349.    basic-block.h recog.h output.h
  350. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  351.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  352. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  353.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  354.    flags.h output.h
  355. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  356.    flags.h insn-config.h insn-attr.h
  357. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
  358.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  359.    hard-reg-set.h insn-codes.h gstab.h xcoffout.h
  360. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  361.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  362.    insn-flags.h insn-codes.h real.h
  363. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  364.    regs.h hard-reg-set.h flags.h insn-config.h
  365.    
  366. aux-output.o : aux-output.c $(CONFIG_H) \
  367.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  368.    insn-flags.h output.h insn-attr.h insn-codes.h
  369.  
  370. # Now the source files that are generated from the machine description.
  371.  
  372. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  373.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  374.   insn-attr.h insn-attrtab.c
  375.  
  376. insn-config.h : md genconfig
  377.     ./genconfig md > tmp-insn-config.h
  378.     ./move-if-change tmp-insn-config.h insn-config.h
  379.  
  380. insn-flags.h : md genflags
  381.     ./genflags md > tmp-insn-flags.h
  382.     ./move-if-change tmp-insn-flags.h insn-flags.h
  383.  
  384. insn-codes.h : md gencodes
  385.     ./gencodes md > tmp-insn-codes.h
  386.     ./move-if-change tmp-insn-codes.h insn-codes.h
  387.  
  388. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  389.     $(CC) $(CFLAGS) -c insn-emit.c
  390.  
  391. insn-emit.c : md genemit
  392.     ./genemit md > tmp-insn-emit.c
  393.     ./move-if-change tmp-insn-emit.c insn-emit.c
  394.  
  395. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  396.     $(CC) $(CFLAGS) -c insn-recog.c
  397.  
  398. insn-recog.c : md genrecog
  399.     ./genrecog md > tmp-insn-recog.c
  400.     ./move-if-change tmp-insn-recog.c insn-recog.c
  401.  
  402. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  403.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  404.     $(CC) $(CFLAGS) -c insn-opinit.c
  405.  
  406. insn-opinit.c: md genopinit
  407.     ./genopinit md > tmp-opinit.c
  408.     ./move-if-change tmp-opinit.c insn-opinit.c
  409.  
  410. insn-extract.o : insn-extract.c $(RTL_H)
  411.     $(CC) $(CFLAGS) -c insn-extract.c
  412.  
  413. insn-extract.c : md genextract
  414.     ./genextract md > tmp-insn-extract.c
  415.     ./move-if-change tmp-insn-extract.c insn-extract.c
  416.  
  417. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  418.     $(CC) $(CFLAGS) -c insn-peep.c
  419.  
  420. insn-peep.c : md genpeep
  421.     ./genpeep md > tmp-insn-peep.c
  422.     ./move-if-change tmp-insn-peep.c insn-peep.c
  423.  
  424. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
  425.     $(CC) $(CFLAGS) -c insn-output.c
  426.  
  427. insn-output.c : md genoutput
  428.     ./genoutput md > tmp-insn-output.c
  429.     ./move-if-change tmp-insn-output.c insn-output.c
  430.  
  431. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  432.      insn-attr.h insn-config.h
  433.     $(CC) $(CFLAGS) -c insn-attrtab.c
  434.  
  435. insn-attr.h: md genattr
  436.     ./genattr md > tmp-attr.h
  437.     ./move-if-change tmp-attr.h insn-attr.h
  438.  
  439. insn-attrtab.c: md genattrtab
  440.     ./genattrtab md > tmp-attrtab.c
  441.     ./move-if-change tmp-attrtab.c insn-attrtab.c
  442.  
  443.  
  444. # Now the programs that generate those files.
  445.  
  446. genconfig : genconfig.oo rtl.oo $(LIBDEPS1)
  447.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genconfig genconfig.oo rtl.oo $(LIBS1)
  448.  
  449. genconfig.oo : genconfig.c $(RTL_H)
  450.     $(HOSTCC) $(HOSTCFLAGS) -c genconfig.c -o genconfig.oo
  451.  
  452. genflags : genflags.oo rtl.oo $(LIBDEPS1)
  453.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genflags genflags.oo rtl.oo $(LIBS1)
  454.  
  455. genflags.oo : genflags.c $(RTL_H)
  456.     $(HOSTCC) $(HOSTCFLAGS) -c genflags.c -o genflags.oo
  457.  
  458. gencodes : gencodes.oo rtl.oo $(LIBDEPS1)
  459.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o gencodes gencodes.oo rtl.oo $(LIBS1)
  460.  
  461. gencodes.oo : gencodes.c $(RTL_H)
  462.     $(HOSTCC) $(HOSTCFLAGS) -c gencodes.c -o gencodes.oo
  463.  
  464. genemit : genemit.oo rtl.oo $(LIBDEPS1)
  465.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genemit genemit.oo rtl.oo $(LIBS1)
  466.  
  467. genemit.oo : genemit.c $(RTL_H)
  468.     $(HOSTCC) $(HOSTCFLAGS) -c genemit.c -o genemit.oo
  469.  
  470. genopinit : genopinit.oo rtl.oo $(LIBDEPS1)
  471.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genopinit genopinit.oo rtl.oo $(LIBS1)
  472.  
  473. genopinit.oo : genopinit.c $(RTL_H)
  474.     $(HOSTCC) $(HOSTCFLAGS) -c genopinit.c -o genopinit.oo
  475.  
  476. genrecog : genrecog.oo rtl.oo $(LIBDEPS1)
  477.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genrecog genrecog.oo rtl.oo $(LIBS1)
  478.  
  479. genrecog.oo : genrecog.c $(RTL_H)
  480.     $(HOSTCC) $(HOSTCFLAGS) -c genrecog.c -o genrecog.oo
  481.  
  482. genextract : genextract.oo rtl.oo $(LIBDEPS1)
  483.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genextract genextract.oo rtl.oo $(LIBS1)
  484.  
  485. genextract.oo : genextract.c $(RTL_H)
  486.     $(HOSTCC) $(HOSTCFLAGS) -c genextract.c -o genextract.oo
  487.  
  488. genpeep : genpeep.oo rtl.oo $(LIBDEPS1)
  489.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genpeep genpeep.oo rtl.oo $(LIBS1)
  490.  
  491. genpeep.oo : genpeep.c $(RTL_H)
  492.     $(HOSTCC) $(HOSTCFLAGS) -c genpeep.c -o genpeep.oo
  493.  
  494. genoutput : genoutput.oo rtl.oo $(LIBDEPS1)
  495.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genoutput genoutput.oo rtl.oo $(LIBS1)
  496.  
  497. genoutput.oo : genoutput.c $(RTL_H)
  498.     $(HOSTCC) $(HOSTCFLAGS) -c genoutput.c -o genoutput.oo
  499.  
  500. genattr : genattr.oo rtl.oo $(LIBDEPS1)
  501.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genattr \
  502.      genattr.oo rtl.oo $(LIBS1)
  503.  
  504. genattr.oo : genattr.c $(RTL_H) config.h
  505.     $(HOSTCC) -c $(HOSTCFLAGS) genattr.c -o genattr.oo
  506.  
  507. genattrtab : genattrtab.oo rtl.oo rtlanal.oo $(LIBDEPS1)
  508.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genattrtab \
  509.      genattrtab.oo rtl.oo rtlanal.oo $(LIBS1)
  510.  
  511. genattrtab.oo : genattrtab.c $(RTL_H) config.h insn-config.h
  512.     $(HOSTCC) -c $(HOSTCFLAGS) genattrtab.c -o genattrtab.oo
  513.  
  514. rtl.oo : rtl.c $(CONFIG_H) $(RTL_H)
  515.     $(HOSTCC) $(HOSTCFLAGS) -c rtl.c -o rtl.oo
  516.  
  517. rtlanal.oo : rtlanal.c $(CONFIG_H) $(RTL_H)
  518.     $(HOSTCC) $(HOSTCFLAGS) -c rtlanal.c -o rtlanal.oo
  519.  
  520. obstack.oo : obstack.c
  521.     $(HOSTCC) $(HOSTCFLAGS) -c obstack.c -o obstack.oo
  522.  
  523. # Remake bytecode files.
  524. # BI_ALL=bi-run.o
  525. BI_ALL=
  526. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  527. BI_OBJ=bi-parser.oo bi-lexer.oo bi-reverse.oo
  528.  
  529.  
  530. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  531.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  532. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  533.         bc-opcode.h bc-typecd.h bc-typecd.def
  534.  
  535. bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  536.   bc-opname.h bc-arity.h bc-opcode.h
  537.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c
  538.  
  539. HOST_CC = $(HOSTCC)
  540. HOST_CFLAGS = $(HOSTCFLAGS)
  541. HOST_LDFLAGS = $(HOSTLDFLAGS)
  542. HOST_LIBDEPS = $(LIBDEPS1)
  543. HOST_LIBS = $(LIBS1)
  544. srcdir = .
  545.  
  546. bytecode: $(BI_ALL) $(BC_ALL)
  547.  
  548. bi-arity: bi-arity.oo $(BI_OBJ) $(HOST_LIBDEPS)
  549.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  550.      bi-arity.oo $(BI_OBJ) $(HOST_LIBS)
  551. bi-opcode: bi-opcode.oo $(BI_OBJ) $(HOST_LIBDEPS)
  552.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  553.      bi-opcode.oo $(BI_OBJ) $(HOST_LIBS)
  554. bi-opname: bi-opname.oo $(BI_OBJ) $(HOST_LIBDEPS)
  555.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  556.      bi-opname.oo $(BI_OBJ) $(HOST_LIBS)
  557.  
  558. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  559.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  560. bi-parser.oo:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  561.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  562.        bi-parser.c -o bi-parser.oo
  563. bi-lexer.oo:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  564.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  565.        bi-lexer.c -o bi-lexer.oo
  566. bi-arity.oo: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  567.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  568.        bi-arity.c -o bi-arity.oo
  569. bi-opcode.oo: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  570.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  571.        bi-opcode.c -o bi-opcode.oo
  572. bi-opname.oo: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  573.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  574.        bi-opname.c -o bi-opname.oo
  575. bi-reverse.oo: bi-reverse.c $(srcdir)/bi-defs.h
  576.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  577.        bi-reverse.c -o bi-reverse.oo
  578.  
  579.  
  580. bc-arity.h: stamp-bcarity ; @true
  581. stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  582.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  583.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  584.     touch stamp-bcarity
  585.  
  586. bc-opcode.h: stamp-bcopcode ; @true
  587. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  588.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  589.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  590.     touch stamp-bcopcode
  591.  
  592. bc-opname.h: stamp-bcopname ; @true
  593. stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  594.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  595.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  596.     touch stamp-bcopname
  597.  
  598. bytecode.mostlyclean:
  599.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  600.  
  601. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  602.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  603.  
  604. bytecode.realclean: bytecode.clean
  605.     -rm -f bi-parser.c bi-parser.h
  606.  
  607.  
  608.  
  609. # Making the preprocessor
  610. gcc-cpp.ttp: cccp
  611.     -rm -f gcc-cpp.ttp
  612.     ln cccp gcc-cpp.ttp
  613.  
  614. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  615.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  616. cexp.o: cexp.c
  617. cexp.c: cexp.y
  618.     $(BISON) cexp.y
  619.     mv cexp.tab.c cexp.c
  620. cccp.o: cccp.c
  621.  
  622. # gnulib is not deleted because deleting it would be inconvenient
  623. # for most uses of this target.
  624. clean: bytecode.clean
  625.     -rm -f *.o *.oo $(STAGESTUFF)
  626.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  627.  
  628. # Get rid of every file that's generated from some other file (except INSTALL).
  629. realclean: clean bytecode.realclean
  630.     -rm -f $(ALL)
  631.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  632.     -rm -f errs gnulib TAGS 
  633.     -rm -f core report
  634.     -rm -f internals internals-* internals.?? internals.??s
  635.  
  636. # Copy the files into directories where they will be run.
  637. #install: all
  638. #    install cc1 $(libdir)/gcc-cc1
  639. #    install cpp $(libdir)/gcc-cpp
  640. #    install gcc $(bindir)
  641.  
  642. force:
  643.  
  644. #In GNU Make, ignore whether `stage*' exists.
  645. .PHONY: clean realclean
  646.